package com.ml.mall.utils;

import com.ml.mall.consts.CommonConsts;
import com.ml.mall.consts.CommonConsts;
import com.ml.mall.entity.sys.SysUser;
import com.ml.mall.enums.RedisUtilsCacheEnum;
import com.ml.mall.security.JwtUtil;

/**
 * Created by kyyang on 2021/2/28 13:51
 */
public class ShoppingCartUtils {

    //获取当前用户购物车key
    public static String getCurShoppingCartKey(){
        SysUser currentUser = JwtUtil.getCurrentUser();
        return RedisUtilsCacheEnum.SHOPPING_CART_KEY.getKeyPrefix() + currentUser.getAcc();
    }

//    public static String getCurCoupponCartKey(){
//        SysUser currentUser = JwtUtil.getCurrentUser();
////        String str = MD5.md5(currentUser.getAcc(), currentUser.getSalt());
//        return RedisUtilsCacheEnum.SHOPPING_CART_COUPON_KEY.getKeyPrefix() + currentUser.getAcc();
//    }

}
